class MySelectMenu {
  constructor() {
    this.title = 'audio'
    this.tag = 'select'
    this.width = 60
  }
  getOptions(editor) {
    const options = [
      { value: 'beijing', text: '北京', styleForRenderMenuList: { 'font-size': '32px', 'font-weight': 'bold' } },
      { value: 'shanghai', text: '上海', selected: true },
      { value: 'shenzhen', text: '深圳' }
    ]
    return options
  }

  getValue(editor) {
    return 'shanghai' // 匹配 options 其中一个 value
  }
  isActive(editor) {
    return false // or true
  }
  isDisabled(editor) {
    return false // or true
  }
  exec(editor, value) {
    editor.insertText(value) // value 即 this.getValue(editor) 的返回值
    editor.insertText(' ')
  }
}

export default MySelectMenu